public class Demo5 {
    public static void main(String[] args) throws InterruptedException {
        Thread t = new Thread(() -> {
            for (int i = 0; i <3; i++) {
                System.out.println("lambda线程");
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        });
        t.start();
        for (int i = 0; i <3 ; i++) {
            System.out.println("main线程");
            Thread.sleep(1000);
        }
    }
}
